package frobagroup.services.backstage;

import frobagroup.entities.backstage.Comment;
import frobagroup.entities.backstage.ImageText;
import frobagroup.entities.backstage.Product;
import frobagroup.pagination.Pagination;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by Tinsley on 2018/5/16.
 */
public interface StaffProductService {

    Product addOrEditProduct(Product product, String sId)throws Exception;
    Product editImageText(MultipartFile pic,String sId,String content,String pId,String order,String type,
                  String itId)throws Exception;
    void removeImageText(String pic,String sId,String pId,String itId)throws Exception;
    ImageText removeImageTextPic(String id, String sId)throws Exception;
    Pagination findProducts(Pagination pagination);
    Map<String,Object> findProductDetial(String id, HttpServletRequest request);
    Product addOrEditProductPic(MultipartFile pic,String pId,String sId)throws Exception;
    Product comment(String pId, Comment comment,String uId);
    List<ImageText> adjustImageTextOrder(Map<String,List<ImageText>> its, String pId);
    Product addOrEditRelatedProduct(Product product);

}
